home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Expert
/
Windows Expert.iso
/
program
/
tpwpxeng.zip
/
PUTLONG.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1991-07-22
|
796b
|
35 lines
program PutLong;
uses PXEngine, WinCrt;
const TableName = 'Table';
var PxErr: Integer;
TblHandle: TableHandle;
RecHandle: RecordHandle;
FldHandle: FieldHandle;
LValue: LongInt;
procedure PX(Code : integer);
begin
writeln(PXErrMsg(Code));
end;
begin
PX(PXWinInit('MyApp', pxShared));
LValue := 76543;
PX(PXTblOpen(TableName, TblHandle, 0, False));
PX(PXRecBufOpen(TblHandle, RecHandle));
PX(PXFldHandle(TblHandle, 'Numeric Field', FldHandle));
(* Update record with long value *)
PxErr := PXPutLong(RecHandle, FldHandle, LValue);
if PxErr <> PxSuccess then
Writeln(PxErrMsg(PxErr))
else PX(PXRecUpdate(TblHandle,RecHandle));
PX(PXRecBufClose(RecHandle));
PX(PXTblClose(TblHandle));
PX(PXExit);
end.